Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
Loading...
Searching...
No Matches
port_to_str.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2019 Roc authors
3 *
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 */
8
9//! @file roc_pipeline/target_stdio/roc_pipeline/port_to_str.h
10//! @brief Port to string.
11
12#ifndef ROC_PIPELINE_PORT_TO_STR_H_
13#define ROC_PIPELINE_PORT_TO_STR_H_
14
15#include "roc_pipeline/config.h"
16
17namespace roc {
18namespace pipeline {
19
20//! Convert port type to string.
21const char* port_type_to_str(PortType type);
22
23//! Convert port protocol to string.
25
26//! Convert pipeline port to string.
28public:
29 //! Construct.
30 explicit port_to_str(const PortConfig&);
31
32 //! Get formatted address.
33 const char* c_str() const {
34 return buffer_;
35 }
36
37private:
38 char buffer_[256];
39};
40
41} // namespace pipeline
42} // namespace roc
43
44#endif // ROC_PIPELINE_PORT_TO_STR_H_
Base class for non-copyable objects.
Definition: noncopyable.h:23
Convert pipeline port to string.
Definition: port_to_str.h:27
port_to_str(const PortConfig &)
Construct.
const char * c_str() const
Get formatted address.
Definition: port_to_str.h:33
PortProtocol
Port protocol.
Definition: port.h:28
const char * port_proto_to_str(PortProtocol proto)
Convert port protocol to string.
PortType
Port type.
Definition: port.h:19
const char * port_type_to_str(PortType type)
Convert port type to string.
Root namespace.
Pipeline config.
Port parameters.
Definition: config.h:56